\begin{problem}{Triangulations}{tri.in}{tri.out}{1 second}{32 megabytes}

  A triangulation of an $n$-vertex convex polygon is a way of partitioning
  it into triangles using some of its diagonals
  (in a convex polygon each angle is smaller than $180^\mathrm{o}$).
  No two of the chosen diagonals can intersect at any point different
  than any of the polygon's vertices.
  Two triangulations of a given polygon are considered different
  if the sets of the diagonals that they include are different
  (we assume that the vertices are numbered from $1$ to $n$).
  
  For example, there are five different triangulations of any
  convex polygon with 5 vertices:

  \includegraphics[scale=0.5]{trizad1.eps}

  \noindent
  Let us denote by $T_n$ the number of triangulations of any
  $n$-vertex polygon.
  Your task is to count $T_3+T_4+\dots+T_n$.
  
    Write a program which:
    \begin{itemize}
      \item
        reads two integers $n$ and $m$ from the standard input,
      \item
        counts the remainder of division of $T_3+\dots+T_n$ by $m$,
      \item
        writes the result to the standard output.
    \end{itemize}

\InputFile

  The first and only line of input contains two integers $n$ and $m$
  ($3\le n\le 100\,000$, $2\le m\le 10^9$), separated by a single space.
  


\OutputFile
  The first and only line of output should contain one integer ---
  $T_3+\dots+T_n$ modulo $m$.


\Example

\begin{example}
\exmp{
5 1000
}{
8
}%
\end{example}


  $T_3=1$ (no diagonals needed for a triangle), $T_4=2$ and $T_5=5$
  (see picture above).
\end{problem}
